package ninth.线程操作案例.问题解决2_加入等待与唤醒;

public class Producer implements Runnable {
    private Info info;

    public Producer(Info info) {
        this.info = info;
    }

    @Override
    public void run() {
        for (int i = 0; i < 50; i++) {
            if (!this.info.flag) {
                this.info.set("张三", "拿拿拿拿拿拿拿拿拿拿");
            } else {
                this.info.set("李四", "做做做做做做做做做");
            }
        }

    }
}
